package com.example.blockbreaker;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity(tableName = "craving_records")
public class CravingRecord {
    @PrimaryKey(autoGenerate = true)
    public int id;

    public int level; // 1-10
    public String trigger;
    public long timestamp;

    // 构造方法
    public CravingRecord(int level, String trigger, long timestamp) {
        this.level = level;
        this.trigger = trigger;
        this.timestamp = timestamp;
    }

    // Getter方法
    public int getId() { return id; }
    public int getLevel() { return level; }
    public String getTrigger() { return trigger; }
    public long getTimestamp() { return timestamp; }

    // Setter (Room使用)
    public void setId(int id) { this.id = id; }

    @ColumnInfo(name = "location")
    public String location; // 可选：记录位置

}